﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using COFE.Core.Profile;
using COFE.Core.Utils;
using COFE.Core.Lister;
using System.IO.IsolatedStorage;
using NUnit.Framework;

namespace COFE.IO.ISG
{
    public class IsolatedStorageFactory : IFactory<IDirectoryLister>
    {

        public IsolatedStorageFactory(string factoryKey)
        {
            Assert.IsNotNullOrEmpty(factoryKey);
            FactoryKey = factoryKey;
        }

        public string FactoryKey { get; private set; }

        public IDirectoryLister Construct(string id, string paramString)
        {
            //"User", "Machine"
            //"Application", "Assembly", "Domain"                        
            return new IsolatedStorageDirectoryLister(this, id, IsolatedStorageFile.GetUserStoreForApplication());
        }

        public string Recycle(IDirectoryLister product)
        {
            return "";
        }
    }
}
